package com.action;

import com.service.DepService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
public class DepAction {

    @Autowired
    private DepService depService;

    @RequestMapping("/showDep")
    public String  showDep(Model m)
    {
          List list = depService.findAll();
          m.addAttribute("list",list);
          return "showDep.html";
    }

}
